From 97c07a14f352ac2e3e80307ddbf11fa25ef04daa Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 28 Mar 2006 16:01:11 +0000 Subject: [PATCH] Move the call to gtk_text_view_end_selection_drag() from 2006-03-28 Matthias Clasen * gtk/gtktextview.c (gtk_text_view_do_popup) (gtk_text_view_grab_notify): Move the call to gtk_text_view_end_selection_drag() from gtk_text_view_do_popup to gtk_text_view_grab_notify, so that it works not only for the text views own popup, but also for other ways in which we might become grab-shadowed during a selection drag. (#74620, Li Yuan) --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ gtk/gtktextview.c | 8 ++++---- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd7934b160..edae516571 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-03-28 Matthias Clasen + + * gtk/gtktextview.c (gtk_text_view_do_popup) + (gtk_text_view_grab_notify): Move the call to + gtk_text_view_end_selection_drag() from gtk_text_view_do_popup + to gtk_text_view_grab_notify, so that it works not only + for the text views own popup, but also for other ways in which + we might become grab-shadowed during a selection drag. + (#74620, Li Yuan) + 2006-03-28 Sven Herzberg reviewed by: Tim Janik diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cd7934b160..edae516571 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2006-03-28 Matthias Clasen + + * gtk/gtktextview.c (gtk_text_view_do_popup) + (gtk_text_view_grab_notify): Move the call to + gtk_text_view_end_selection_drag() from gtk_text_view_do_popup + to gtk_text_view_grab_notify, so that it works not only + for the text views own popup, but also for other ways in which + we might become grab-shadowed during a selection drag. + (#74620, Li Yuan) + 2006-03-28 Sven Herzberg reviewed by: Tim Janik diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index b338955fd1..2d1ec400cb 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -3720,7 +3720,10 @@ gtk_text_view_grab_notify (GtkWidget *widget, gboolean was_grabbed) { if (!was_grabbed) - gtk_text_view_unobscure_mouse_cursor (GTK_TEXT_VIEW (widget)); + { + gtk_text_view_end_selection_drag (GTK_TEXT_VIEW (widget), NULL); + gtk_text_view_unobscure_mouse_cursor (GTK_TEXT_VIEW (widget)); + } } @@ -7314,9 +7317,6 @@ gtk_text_view_do_popup (GtkTextView *text_view, { PopupInfo *info = g_new (PopupInfo, 1); - /* should not need this, see http://bugzilla.gnome.org/show_bug.cgi?id=74620 */ - gtk_text_view_end_selection_drag (text_view, event); - /* In order to know what entries we should make sensitive, we * ask for the current targets of the clipboard, and when * we get them, then we actually pop up the menu. -- 2.30.2